<template>
	<view class="lay-root">
		<view class="step-root">
			<view class="lay-item" v-for="(item,index) in stepsData" :key="index">
				<image v-if="index != 0" class="lay-arrow" :src="index <= currentStep ? 
					'/static/commit/icon_steps_blue@2x.png' : '/static/commit/icon_steps_dark@2x.png'"></image>

				<view class="lay-info">
<!-- 					<image class="item-img" :src="
						index <= currentStep ? item.selectPicSrc :item.unselectPicSrc"></image> -->
						<image class="item-img" :src="
							index <= currentStep ? (baseUrl + item.data.actIcon) : (baseUrl + item.data.icon) "></image>
					<view :class="index <= currentStep? 'item-title-finish' : 'item-title-unfinish'">
						<text>{{item.data.type}}</text>
					</view>
					<view class="item-desc">
						<text>{{item.label}}</text>
					</view>
				</view>
			</view>

		</view>
	</view>
</template>

<script>
	import CONSTS from '@/common/consts.js'
	export default {
		data() {
			return {
				baseUrl: CONSTS.STATICHOST,
			}
		},
		
		props: {
			stepsData: {
				type: Array
			},

			currentStep: {
				type: Number
			}
		},

		methods: {
			onEntryClick(e) {
				this.$emit("onEntryClick", e);
			}
		}
	}
</script>

<style scoped lang="scss">
	.lay-root {}

	.step-root {
		display: flex;
		flex-direction: row;
		padding: 40upx 20upx;
		justify-content: space-between;
	}

	.lay-item {
		display: flex;
		flex-direction: row;
		align-items: center;

		.lay-info {
			display: flex;
			flex-direction: column;
			align-items: center;
			margin: 0upx 20upx;

			.item-img {
				width: 106upx;
				height: 106upx;
			}

			.item-title-finish {
				font-size: 30upx;
				color: #008EFE;
			}

			.item-title-unfinish {
				font-size: 30upx;
				color: #666666;

			}

			.item-desc {
				font-size: 24upx;
				color: #4A4A4A;
			}
		}

		.lay-arrow {
			width: 32upx;
			height: 32upx;
		}


	}
</style>
